package com.lingx.model.impl.validator;

import java.util.Map;

import com.lingx.model.IContext;
import com.lingx.model.IPerformer;
import com.lingx.model.impl.AbstractValidator;
import com.lingx.model.impl.DefaultField;

public class NotNullValidator extends AbstractValidator {

	private static final long serialVersionUID = 5104545985585423221L;

	public NotNullValidator() {
		super("NotNullValidator", "非空验证");
		this.setComment("不需要额外参数");
	}
	@Override
	public boolean valid(Object value,String param,Map<String,Object> params,DefaultField code,IContext context)throws Exception {
		
		return value!=null&&!"".equals(value.toString());
	}



}
